wordpress get posts by multiple authors

59

// Where the authors' ids are "1, 2, 3, 4", etc
get_posts([ 'author__in'=> [1, 2, 3, 4], 'post_type' => 'page', 'numberposts' => -1 ]);

// Original SO answer
query_posts( array( 'author__in'=> array_keys($following) , 'paged' => $paged, ) );

Comments

Submit
0 Comments